package uestc.lj.gulishop.product.service;

import com.baomidou.mybatisplus.extension.service.IService;
import uestc.lj.common.utils.PageUtils;
import uestc.lj.gulishop.product.entity.CategoryEntity;
import uestc.lj.gulishop.product.vo.Catelog2VO;

import java.util.List;
import java.util.Map;

/**
 * 商品三级分类
 *
 * @author crazlee
 * @email peterlee0@163.com
 * @date 2021-05-21 16:56:25
 */
public interface CategoryService extends IService<CategoryEntity> {

    PageUtils queryPage(Map<String, Object> params);

    /**
     * 查出所有分类以及子分类，以树形结构组装起来
     *
     * @return
     */
    List<CategoryEntity> listWithTree();

    /**
     * 批量删除未被引用的菜单
     * @param asList
     */
    void removeMenusByIds(List<Long> asList);

    /**
     * 根据当前菜单ID求解出当前菜单的完整路径
     * @param catelogId
     * @return
     */
    Long[] findCatelogPath(Long catelogId);

    void updateCascade(CategoryEntity category);

    List<CategoryEntity> getLevelOneCategory();

    Map<String, List<Catelog2VO>> getCatalogJson();

}

